package com.example.controller;

import com.example.entity.supervision.CheckResult;
import com.example.service.CheckResultService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * Created by simon on 2018/8/7.
 * 检查项目结果记录
 */
@RestController
@RequestMapping("api/checkResult")
public class CheckResultController {

    @Autowired
    CheckResultService checkResultService;

    /**
     * 按条件查询 检查项目结果
     * @param map
     * @return
     */
    @RequestMapping(value = "/queryCheckResult", method = RequestMethod.POST)
    Map<String, Object> queryByScrid(@RequestBody Map map) {
        return checkResultService.queryByScrid(map);
    }


    /**
     * 添加 检查项目结果
     * @param map
     * @return
     */
    @RequestMapping(value = "/addCheckResult", method = RequestMethod.POST)
    Map<String, Object> add(@RequestBody CheckResult map) {
        return checkResultService.add(map);
    }


}
